package com.monolithiot.cdn.management.controller;

import com.monolithiot.cdn.management.common.context.Constants;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 2018/11/18 Create by 郭文梁
 * IndexController
 * 引导页控制器
 *
 * @author 郭文梁
 * @date 2018/11/18
 */
@Controller
public class IndexController {
    /**
     * 引导视图
     *
     * @param path 视图名称
     * @return 视图名称（交给spring mvc解析视图）
     */
    @GetMapping("/")
    public String index(String path) {
        if (StringUtils.isEmpty(path)) {
            return Constants.View.INDEX;
        }
        return path;
    }
}
